//package com.alex.springbootdemo.task;
//
//import com.alex.springbootdemo.lock.RedissonLock;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
///**
// * 使用@Scheduled注解定义定时任务，简单方便，推荐使用
// */
//@Component
//public class ScheduledJobDemo {
//
//
//    @RedissonLock(prefixKey = "scheduled.task", key = "ScheduledJobDemo")
//    //每五秒执行
//    @Scheduled(cron = "0/5 * * * * ?")
//    public void run() {
//        System.out.println("ScheduledJobDemo定时任务执行啦");
//    }
//}
